# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rest1
pkgver=0.9.1
pkgrel=1
pkgdesc="Library for access to RESTful web services"
url="https://www.gnome.org/"
arch="all"
license="LGPL-2.0-or-later"
makedepends="
	gi-docgen
	gobject-introspection-dev
	json-glib-dev
	libsoup3-dev
	libxml2-dev
	meson
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.gnome.org/sources/rest/${pkgver%.*}/rest-$pkgver.tar.xz"
options="!check" # Flickr test fails
builddir="$srcdir/rest-$pkgver"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dexamples=false \
		-Dsoup2=false \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
7fb219f571aec2b8d09d71e257e2b230bfb5c862e7e425fd540c96f6e2a22457df7d3df32838d71beec00ba54c7adbd0301d744bb0497c46b3a1413949304462  rest-0.9.1.tar.xz
"
